<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 *  
 * @package admin
 * @author Mervin.Wong<mervin0502@163.com>
 * @Copyright
 * @license  http://www.apache.org/licenses/LICENSE-2.0
 * @version 0.1.0
 * @date 2013-2-22下午8:52:46
 *
 */
 
 /**
 * CanGoo Menu 控制器
 *
 *	博客模块的后台管理菜单
 *
 * @package		admin
 * @subpackage	Controllers
 * @category	Admin-controllers
 * @author		Mervin.Wong<mervin0502@163.com
 * @link		http://mervin.me/project/cangoo
 */ 
 class Menu extends CI_Controller{
 	/**
 	 * 构造函数
 	 * @access public
 	 * @return void 
 	 */
 	public function __construct(){
 		parent::__construct();
 	  	$this->load->helper('url');
  		$this->load->library('session');
  		$this->load->model('common_model');
  		if(!$this->common_model->is_login($this->session->userdata('session_id'))){
  			redirect(site_url('index/login', 'refresh'));
  		}
 	}
 	
 	/**
 	 * 默认执行方法
 	 * @access public
 	 * @return void
 	 */
 	public function index(){
 		/**
 		 * 博客设置
 		 * 
 		 * 文章列表
 		 * 发表文章
 		 * 
 		 * 评论管理
 		 * 
 		 * 分类管理
 		 * 标签管理
 		 * 
 		 */
 		$data['menus']['option'] = anchor(site_url('blog/option/index'), '博客设置', array('target'=>'main','title'=>'博客设置'));
 		$data['menus']['post_list'] = anchor(site_url('blog/post/index'), '文章列表', array('target'=>'main','title'=>'文章列表'));
 		$data['menus']['post_add'] = anchor(site_url('blog/post/add'), ' 发表文章', array('target'=>'main','title'=>'发表文章'));
 		$data['menus']['comment_manage'] = anchor(site_url('blog/comment/'), '评论管理', array('target'=>'main','title'=>'评论管理'));

/* 		$data['menus']['option']['name'] = '博客设置';
 		$data['menus']['option']['url'] = $this->entry_path."/blog/option/index";
		
		$data['menus']['post_list']['name'] = '文章列表';
 		$data['menus']['post_list']['url'] = $this->entry_path."/blog/post/index";
 		$data['menus']['post_add']['name'] = '发表文章';
 		$data['menus']['post_add']['url'] = $this->entry_path."/blog/post/add";
 		
 		$data['menus']['comment_manage']['name'] = '评论管理';
 		$data['menus']['comment_manage']['url'] = $this->entry_path."/blog/comment/listing";
 		$data['menus']['category_manage']['name'] = '分类管理';
 		$data['menus']['category_manage']['url'] = $this->entry_path."/blog/category/index";
 		$data['menus']['tag_manage']['name'] = '标签管理';
 		$data['menus']['tag_manage']['url'] = $this->entry_path."/blog/tag/index";*/
 		
 		$this->load->view('blog/menu_view.php', $data);
 	}
 }
/* End of file menu.php */
/* Location : ./apps/admin/controllers/blog/menu.php */